/*
 *   @Author: 1296
 *   @Date: 2025-03-20
 *   @Description: 语言配置
*/
import { createI18n } from 'vue-i18n'
import zhCN from '@/locales/zh-CN.json'
import enUS from '@/locales/en-US.json'
import ko from '@/locales/ko.json'
import ja from '@/locales/ja.json'
import zhTW from '@/locales/zh-TW.json'

const messages = {
    'zh-CN': zhCN,
    'en-US': enUS,
    'ko': ko,
    'ja': ja,
    'zh-TW': zhTW,
}

const i18n = createI18n({
    legacy: false,
    locale: sessionStorage.getItem('locale') || 'zh-CN',
    globalInjection: true,
    messages
})

export default i18n

